-- GENERATED SPELL FOR [Ghostly Sage] --


function spell0_25351(pUnit, Event) --@Moonfire,n/a--
pUnit:FullCastSpellOnTarget(15798,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25351', 12000, 1)
end

function spell1_25351(pUnit, Event) --@Wrath,n/a--
pUnit:FullCastSpellOnTarget(9739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25351', 2000, 1)
end

function Sorts_25351(pUnit, Event)
local choix_sorts_25351 = math.random(0, 1)
if choix_sorts_25351 == 0 then
pUnit:RegisterEvent('spell0_25351', 1, 1)
end
if choix_sorts_25351 == 1 then
pUnit:RegisterEvent('spell1_25351', 1, 1)
end
end

function mob25351_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25351', math.random(1500, 3000), 1)
end

function mob25351_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25351_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25351_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25351, 1, 'mob25351_Action')
RegisterUnitEvent(25351, 2, 'mob25351_Leave')
RegisterUnitEvent(25351, 3, 'mob25351_Kill')
RegisterUnitEvent(25351, 4, 'mob25351_Die')
